@extends('admin.layouts.app')
@section('css')
  <link href="{{asset('assets/plugins/responsive-table/css/rwd-table.min.css')}}" rel="stylesheet" type="text/css" media="screen">
@endsection
@section('content')


						
						
						
						
						<div class="row">
							<div class="col-sm-12">
								<div class="card-box">

									<div class="row">
			                        	
			                        	<div class="col-sm-4">
			                        		 <button  class="btn btn-default btn-md waves-effect waves-light m-b-30 addModal" data-animation="fadein"
			                                                    	data-overlaySpeed="200" data-overlayColor="#36404a"><i class="md md-add"></i> ADD</button>
			                        	</div>
			                        </div>
@include('admin.common.error')

									<div class="table-rep-plugin">
										<div class="table-responsive" >
											<table  class="table  table-striped">
												<thead>
													<tr>
														<th>ID</th>
														
								<th>Class</th>
								<th>Price/Min</th>
														
														
														<th data-priority="3">Handler</th>
														
													</tr>
												</thead>
												<tbody>
                        @foreach($list as $v)  
													<tr>
														<th>{{$v->id}}</th>

														
								<td>{{$v->name}}</td>
								<td>{{$v->price}}</td>
														
														
														<td>
															<a href="{{url('zadmin/cartypes/'.$v->id.'/edit')}}" class="btn btn-primary btn-sm">
																<span class="btn-label">
																<i class="md md-edit"></i>
																</span>Edit</a>

															 <a class="btn btn-sm btn-danger" href="{{url('zadmin/cartypes',$v->id)}}" data-method="delete" 
  data-token="{{csrf_token()}}" data-confirm="Are you sure you want to delete?">
<span class="btn-label">
  <i class="md md-close"></i>
</span>Delete</a>
													   </td>
														
													</tr>
                        @endforeach
													
												</tbody>
											</table>
										</div>
{{$list->links()}}
									</div>

								</div>
							</div>
						</div>
						


				<div id="add-modal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
                                        <div class="modal-dialog">
                                            <div class="modal-content">
                                                <div class="modal-header">
                                                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                                                    <h4 class="modal-title" id="myModalLabel">Add</h4>
                                                </div>
                                             <form class="form-horizontal" role="form" method="post" action="{{url('zadmin/cartypes')}}">  
                                             {{csrf_field()}}  
                                                <div class="modal-body">
                                                                                       
	                                            <div class="form-group">
	                                                <label class="col-md-2 control-label">Class</label>
	                                                <div class="col-md-10">
	                                                    <input type="text" class="form-control" value="" name="name">
	                                                </div>
	                                            </div>
	                                             <div class="form-group">
	                                                <label class="col-md-2 control-label">Price/Min</label>
	                                                <div class="col-md-10">
	                                                    <input type="text" class="form-control" value="" name="price">
	                                                </div>
	                                            </div>
	                                            
	                                           

	                                                          
	                                           

	                                                                                                                  
	                                            
	                                            
	                                            
	                           
	                                        

                                                   
                                                </div>
                                                <div class="modal-footer">
                                                    <button type="button" class="btn btn-default waves-effect" data-dismiss="modal">Close</button>
                                                    <button type="submit" class="btn btn-primary waves-effect waves-light">Save</button>
                                                </div>
                                            </form>
                                            </div><!-- /.modal-content -->
                                        </div><!-- /.modal-dialog -->
                                    </div><!-- /.modal -->

 @endsection 
               
         

    @section('js')
    <script type="text/javascript">
    	$('.addModal').on('click',function(){
    		$('#add-modal').modal('show');
    	});
    </script> 
       
    @endsection    

